<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <link rel="stylesheet" href="./css/index.css" />
    <title>实现左中右布局的5种方式</title>
  </head>
  <body>
    <p>浮动布局、左右浮动、中间自动填充</p>
    <p>需要注意排列的顺序</p>
    <div class="float-layout">
      <div class="left">左</div>
      <div class="right">右</div>
      <div class="center">中</div>
    </div>

    <p>绝对定位</p>
    <div class="position-layout">
      <div class="left">左</div>
      <div class="center">中</div>
      <div class="right">右</div>
    </div>

    <p>flex 布局</p>
    <div class="flex-layout">
      <div class="left">左</div>
      <div class="center">中</div>
      <div class="right">右</div>
    </div>

    <p>表格布局</p>
    <div class="table-layout">
      <div class="left">左</div>
      <div class="center">中</div>
      <div class="right">右</div>
    </div>

    <p>网格布局</p>
    <div class="gird-layout">
      <div class="left"></div>
      <div class="center"></div>
      <div class="right"></div>
    </div>
  </body>
</html>
